package ace.module.oauth2.server.api.model.input.params;

import ace.module.oauth2.server.api.model.input.Oauth2AceAuthParams;
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotEmpty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author caspar
 * @date 2023/10/24 10:19
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Oauth2AceAuthParamsUsername implements Oauth2AceAuthParams {

  @NotEmpty
  private String username;
  @NotEmpty
  private String password;

  /**
   * 可选，根据配置自动验证是否必填
   */
  @Nullable
  private String code;

  /**
   * 可选，根据配置自动验证是否必填
   */
  @Nullable
  private Long captchaItemId;
}
